﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ReflectionStudio.Controls"
    >

    <!-- Header control-->
    <Style x:Key="{x:Type local:DialogHeader}" TargetType="{x:Type local:DialogHeader}">
        <Setter Property="HorizontalAlignment" Value="Stretch"/>
		<Setter Property="VerticalAlignment" Value="Stretch"/>
		<Setter Property="VerticalContentAlignment" Value="Stretch"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:DialogHeader}">
                    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="*" />
                            <RowDefinition Height="2" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="10" />
                            <ColumnDefinition Width="3*" />
                        </Grid.ColumnDefinitions>
                        <Rectangle Grid.ColumnSpan="3" Grid.RowSpan="2" RadiusX="16" RadiusY="16" Fill="{DynamicResource ShineBrush}" />
                        
                        <Image Grid.RowSpan="2" x:Name="imageHeaderCtrl" Source="{TemplateBinding Image}"
							Stretch="None" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="5"/>

                        <TextBlock Grid.Column="2" x:Name="titleHeaderCtrl" FontWeight="Bold" 
                            Foreground="{DynamicResource NormalForegroundBrush}" 
			                VerticalAlignment="Center" FontSize="17" Text="{TemplateBinding Title}"/>

                        <TextBlock Grid.Column="2" Grid.Row="1" x:Name="contentHeaderCtrl"
                            Foreground="{DynamicResource NormalForegroundBrush}" 
		                    TextWrapping="Wrap" VerticalAlignment="Center" Text="{TemplateBinding Description}"
                            />
                        <Rectangle Grid.ColumnSpan="3" Grid.Row="2" VerticalAlignment="Stretch" 
                                   Fill="{DynamicResource DefaultBorderBrush}" Visibility="{TemplateBinding HasSeparator }"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>